import { Component } from 'react';
import { Provider } from 'react-redux';
import Taro from '@tarojs/taro';
import 'taro-ui/dist/style/index.scss';
import store from './redux/store';

import './app.scss';

class App extends Component {
  componentDidMount() {
    if (process.env.TARO_ENV === 'weapp') {
      Taro.cloud.init({
        env: 'zqr-5gbycw71f67d1418',
      });
    }
  }

  render() {
    return <Provider store={store}>{this.props.children}</Provider>;
  }
}

export default App;
